/*
 * AhaTypes.h
 *
 *  Created on: 26 mars 2011
 *      Author: eric
 */

#ifndef AHATYPES_H_
#define AHATYPES_H_

#include "AhaProtocol.h"

#define AHA_NV_TYPE_SWITCH 0

#define AHA_NV_DIR_INPUT   0
#define AHA_NV_DIR_OUTPUT  1

#define AHA_TYP_SWITCH_ON  0x1
#define AHA_TYP_SWITCH_OFF 0x0

class AhaTypes {
public:
	typedef struct {
		unsigned short value; // OFF = 0 ON > 0 (0-200 -> 0%-100%)
		unsigned short state; // ON or OFF
	} AHA_switch;

	AhaTypes();

	void setCanMessage(AhaProtocol::AHA_MSG *ahaMsg, uint16_t nodeAdr,
			uint8_t cidDir, uint16_t cidNvBnd, AhaTypes::AHA_switch *ahaSwitch);
};

#endif /* AHATYPES_H_ */
